<?php require_once(dirname(__FILE__).'/../include/config.inc.php');
//获取用户信息
require_once "function.php";


?>
<!DOCTYPE html>
<html>
<head>
<title>博教通 运维管理平台 </title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="description" content="修总管运维管理系统">
<link rel="stylesheet" href="lib/weui.min.css">
<link rel="stylesheet" href="css/jquery-weui.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/demos.css">
</head>
<body ontouchstart>
<div class="top"> <img src="images/top4.jpg" width="100%"> </div>
<!-- 报修信息 -->
<div class="main">
  <div class="weui-cells__title"><i class="fa fa-id-card-o" aria-hidden="true"></i>服务类型</div>
  <div class="weui-flex service-list">
    <div class="weui-flex__item"><a href="apply.php"><img src="images/baoxiu.jpg" width="100%"/><p>故障报修</p></a></div>
    <div class="weui-flex__item"><a href="javascript:;" id="saoma" ><img src="images/saoma.jpg" width="100%"/><p>扫描快速报修</p></a></div>
  </div>
  <div class="weui-flex service-list">
    
    <div class="weui-flex__item"><a href="school.php"><img src="images/faq.jpg" width="100%"/><p>常见问题自助解决</p></a></div>
     <div class="weui-flex__item"><a href="contact.php"><img src="images/lianxi.jpg" width="100%"/><p>联系我们</p></a></div>
  </div>
</div>
<div class="clear"></div>
<script src="lib/jquery-2.1.4.js"></script> 
<script src="lib/fastclick.js"></script> 
<script>
  $(function() {
    FastClick.attach(document.body);
  });
</script> 
<script src="js/jquery-weui.js"></script> 
<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script>
  wx.config({
    debug: false,
    appId: '<?php echo $signPackage["appId"];?>',
    timestamp: <?php echo $signPackage["timestamp"];?>,
    nonceStr: '<?php echo $signPackage["nonceStr"];?>',
    signature: '<?php echo $signPackage["signature"];?>',
    jsApiList: [
      // 所有要调用的 API 都要加到这个列表中
	    'onMenuShareTimeline',
        'onMenuShareAppMessage',
        'onMenuShareQQ',
        'onMenuShareWeibo',
		'openAddress',
		'chooseImage',
		'previewImage',
		'uploadImage',
		'downloadImage',
		'scanQRCode'
    ]
  });
  wx.ready(function () {
	  // 分享
	  var urlurl=window.location.href;
	  var shareData = {
    	   title: '修总管运维管理系统-在线报修',
    	   desc: '修总管运维管理系统在线服务系统，2小时内响应。',
           link: urlurl,
           imgUrl: 'http://wx.gongdantong.com/wx/images/yitiji.jpg'
	  };
	  
	  
	  wx.onMenuShareAppMessage(shareData);
	  wx.onMenuShareTimeline(shareData);
	  wx.onMenuShareQQ(shareData);
	  wx.onMenuShareQZone(shareData);

	   $("#saoma").on("click",function(){  
	   		
			  //do something
			  	  wx.scanQRCode({
					needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
					scanType: ["barCode"], // 可以指定扫二维码还是一维码，默认二者都有
					success: function (res) {
					var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
					if(result.length>10){
						window.location.href = "saoma.php?ma="+result
					}
					}
				});
		

	   })
	  
  })
</script>    
 <div class="sub_btn"></div>
<?php require_once('footer.php'); ?>